<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>验证访问 - 控制面板</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <link rel="stylesheet" th:href="@{/css/style.css}">
    <style>
        .verify-container {
            display: flex;
            min-height: 100vh;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            z-index: 1;
        }
        
        .verify-card {
            width: 100%;
            max-width: 450px;
            background: var(--card-bg);
            backdrop-filter: var(--backdrop-filter);
            -webkit-backdrop-filter: var(--backdrop-filter);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            animation: fadeIn 0.8s ease-out;
            position: relative;
            overflow: hidden;
        }
        
        .verify-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .verify-header h1 {
            font-size: 2.2rem;
            margin-bottom: 10px;
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .verify-header p {
            color: var(--text-light);
            font-size: 1rem;
        }
        
        .verify-icon {
            text-align: center;
            margin-bottom: 20px;
            font-size: 3rem;
            color: var(--primary-color);
        }
    </style>
</head>
<body>
    <div class="verify-container">
        <div class="verify-card">
            <div class="verify-icon">
                <i class="fas fa-lock"></i>
            </div>
            
            <div class="verify-header">
                <h1>控制面板访问验证</h1>
                <p>请输入访问密码以继续</p>
            </div>
            
            <div th:if="${param.error}" class="alert alert-danger">
                密码不正确，请重试
            </div>
            
            <form th:action="@{/verify-dashboard}" method="post" id="verifyForm">
                <div class="form-group">
                    <label for="password">访问密码</label>
                    <input type="password" id="password" name="password" class="form-control" required autofocus placeholder="请输入访问密码">
                </div>
                
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-block">
                        <i class="fas fa-key"></i> 验证并进入
                    </button>
                </div>
                
                <input type="hidden" name="redirectUrl" th:value="${redirectUrl}">
            </form>
            
            <div class="auth-footer">
                <p><a th:href="@{/}">返回首页</a></p>
            </div>
        </div>
    </div>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            document.getElementById('verifyForm').addEventListener('submit', function(e) {
                const password = document.getElementById('password').value.trim();
                if (!password) {
                    e.preventDefault();
                    alert('请输入密码');
                }
            });
        });
    </script>
</body>
</html> 